/**
 * Project: drink-maker-proj
 * Package: com.made2ordersoftware.drinkmaker.domain
 * File: DrinkIngredientEntityPK.java
 * Created: May 10, 2014
 */
/**
 * Copyright (c) 2010 Made 2 Order Software, LLC
 *
 * All rights reserved. No part of this software may be reproduced, stored in a retrieval system, or
 * transmitted in any form or by any means, without the prior written permission of Made 2 Order Software.
 *
 * You may not distribute the URL or redistribute the files to third parties. You may transfer the files onto
 * a single storage device so long as you can prove ownership of the software. You may not reverse engineer,
 * decompile, or disassemble the software or media files. You may not modify or translate the software or
 * media, or distribute copies of the software or media without the written consent of Made 2 Order Software,
 * LLC.
 */
package com.made2ordersoftware.drinkmaker.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author David
 * @version 1.0.0
 */
@Embeddable
public class DrinkIngredientEntityPK implements Serializable {

    private static final Logger LOG = LoggerFactory.getLogger(DrinkIngredientEntityPK.class);
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Column(name = "drink_id")
    private long drinkId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ingredient_id")
    private long ingredientId;

    public DrinkIngredientEntityPK() {
    }

    public DrinkIngredientEntityPK(long drinkId, long ingredientNamesId) {
        this.drinkId = drinkId;
        this.ingredientId = ingredientNamesId;
    }

    // <editor-fold defaultstate="collapsed" desc="getters-setters">
    public long getDrinkId() {
        return drinkId;
    }

    public void setDrinkId(long drinkId) {
        this.drinkId = drinkId;
    }

    public long getIngredientId() {
        return ingredientId;
    }

    public void setIngredientId(long ingredientId) {
        this.ingredientId = ingredientId;
    }
    // </editor-fold>

    // <editor-fold defaultstate="collapsed" desc="hash-equal-tostring">
    @Override
    public int hashCode() {
        int hash = 23;
        hash += (int) drinkId;
        hash += (int) ingredientId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof DrinkIngredientEntityPK)) {
            return false;
        }
        DrinkIngredientEntityPK other = (DrinkIngredientEntityPK) object;
        if (this.drinkId != other.drinkId) {
            return false;
        }
        return this.ingredientId == other.ingredientId;
    }

    @Override
    public String toString() {
        return "com.made2ordersoftware.drinkmaker.domain.DrinkIngredientEntityPK[ drinkId=" + drinkId
                + ", ingredientNamesId=" + ingredientId + " ]";
    }
    // </editor-fold>

}
